package com.newbsd.web.maventest.service.impl;

import java.util.List;

import com.newbsd.web.maventest.dao.UserDao;
import com.newbsd.web.maventest.dao.impl.UserDaoImpl;
import com.newbsd.web.maventest.pojo.User;
import com.newbsd.web.maventest.service.UserService;

/**
 * 
 * @author Mei
 *
 */
public class UserServiceImpl implements UserService{
	private UserDao userDao = new UserDaoImpl();
	
	@Override
	public List<User> queryUser(int page,int rows) {
		return userDao.getAll(page, rows);
	}
	
	@Override
	public void addUserManager(User u) {
		 userDao.addUser(u);
	}

	@Override
	public List<User> queryUser() {
		
		return userDao.getAll();
	}

	@Override
	public int countUser() {
		
		return userDao.countUser();
	}

	@Override
	public void delUser(int id) {
		userDao.delUser(id);
		
	}

	@Override
	public User findByUsername(String username) {
		
		return userDao.findByUsername(username);
	}


}
